
clear all
set more off
use "FismanJakielaKarivMarkovitsdata", clear


** Table 1:  summary statistics
foreach var of varlist age female borninus nonhisp college {
 sum `var' if samp==1 
 sum `var' if samp==2
}
count if samp==1 
count if samp==2

** Table 2:  regressions of estimated CES parameters
preserve
keep if samp==1 | samp==2
gen yale = (samp==1)
gen eff_focus = (rho>0)
gen agecat = floor((age-1)/5)-3
replace agecat = 1 if agecat==0
tobit alpha yale, ul(1) r
qreg rho yale, quantile(0.25)
qreg rho yale, quantile(0.5)
qreg rho yale, quantile(0.75)
probit eff_focus yale, r
tobit alpha yale female i.agecat college, ul(1) r
qreg rho yale female i.agecat college, quantile(0.25)
qreg rho yale female i.agecat college, quantile(0.5)
qreg rho yale female i.agecat college, quantile(0.75)
probit eff_focus yale female i.agecat college, r
restore

** Table 3:  ordered logit regressions of YLS subjects' career choices 
preserve 
drop if samp!=1 | exdate==2013
gen careercat = cond(nonprofit==1,1,cond(intermed==1,2,cond(corp==1,3,.)))
xtile rhodecile = rho, nq(10)
gen rhohigh = rhodecile>=6
gen agecat = floor((age-1)/5)-3
replace agecat = 1 if agecat==0
ologit careercat rhohigh, r
ologit careercat rhodecile, r
ologit careercat rhohigh female i.agecat i.exdate, r
ologit careercat rhodecile female i.agecat i.exdate, r
restore

** Table S1:  regressions of estimated CES parameters - ALP elites and non-elites
preserve
keep if samp==4 | samp==5
gen elite = (samp==4)
gen eff_focus = (rho>0)
gen agecat = floor((age-1)/5)-3
replace agecat = 1 if agecat==0
tobit alpha elite, ul(1) r
qreg rho elite, quantile(0.25)
qreg rho elite, quantile(0.5)
qreg rho elite, quantile(0.75)
probit eff_focus elite, r
tobit alpha elite female i.agecat, ul(1) r
qreg rho elite female i.agecat, quantile(0.25)
qreg rho elite female i.agecat, quantile(0.5)
qreg rho elite female i.agecat, quantile(0.75)
probit eff_focus elite female i.agecat, r
restore

** Table S2:  regressions of estimated CES parameters - UCB and ALP samples
preserve
keep if samp==2 | samp==3
gen ucb = (samp==3)
gen eff_focus = (rho>0)
tobit alpha ucb, ul(1) r
qreg rho ucb, quantile(0.25)
qreg rho ucb, quantile(0.5)
qreg rho ucb, quantile(0.75)
probit eff_focus ucb, r
restore

** Figures 1 and S1:  CCEI histograms 
preserve
count if samp==1
local yale_denom = r(N)
count if samp==2
local alp_denom = r(N)
count if samp==3
local ucb_denom = r(N)
count if samp==4
local elite_denom = r(N)
count if samp==5
local non_denom = r(N)
local tempmin = 0.7
gen cceibin = .
forvalues i = 1/10 { 
 local j = 0.05*`i'
 replace cceibin = `i' if ccei<=`tempmin'+`j' & cceibin==.
}
bysort cceibin:  egen yale_num = count(ccei) if sample==1
gen yalevar = yale_num / `yale_denom'
bysort cceibin:  egen alp_num = count(ccei) if sample==2
gen alpvar = alp_num / `alp_denom'
bysort cceibin:  egen ucb_num = count(ccei) if sample==3
gen ucbvar = ucb_num / `ucb_denom'
bysort cceibin:  egen elite_num = count(ccei) if sample==4
gen elitevar = elite_num / `elite_denom'
bysort cceibin:  egen non_num = count(ccei) if sample==5
gen nonvar = non_num / `non_denom'

label define cceilabel 1 "CCEI {&le} 0.75" 2 "0.75 {&lt} CCEI {&le} 0.8" 3 "0.8 {&lt} CCEI {&le} 0.85" ///
 4 "0.85 {&lt} CCEI {&le} 0.9" 5 "0.9 {&lt} CCEI {&le} 0.95" 6 "0.95 {&lt} CCEI {&le} 1"
label values cceibin cceilabel

graph bar (mean) yalevar alpvar, over(cceibin, label(angle(45) labsize(small))) bar(1, color(navy)) ///
 bar(2, fcolor(bluishgray) lcolor(navy)) ///
 ylabel(0(0.1)0.8) ///
 legend(cols(1) lab(1 "Yale law students (YLS sample)") lab(2 "American adults (ALP sample)"))
graph bar (mean) elitevar nonvar, over(cceibin, label(angle(45) labsize(small))) bar(1, color(navy)) ///
 bar(2, fcolor(bluishgray) lcolor(navy)) ///
 ylabel(0(0.1)0.8) ///
 legend(cols(1) lab(1 "ALP elites") lab(2 "ALP non-elites"))
graph bar (mean) ucbvar alpvar, over(cceibin, label(angle(45) labsize(small))) bar(1, color(navy)) ///
 bar(2, fcolor(bluishgray) lcolor(navy)) ///
 ylabel(0(0.1)0.8) ///
 legend(cols(1) lab(1 "UC Berkeley undergraduates (UCB sample)") lab(2 "American adults (ALP sample)"))
restore

** Figure 2:  classifying subjects' distributional preferences
preserve
keep if sample==1 | sample==2
count if sample==1
local yaledenom = `r(N)'
count if sample==2
local alpdenom = `r(N)'
gen fairminded = (0.45<alpha & alpha<0.55)
gen selfish = alpha>0.95
gen eff_focus = (rho>0)
gen eq_focus = (rho<0)

gen alphacat = cond(fairminded==1,1,cond(selfish==0,2,3))
label define alphalabel 1 "Fair-minded" 2 "Intermediate" 3 "Selfish"
label values alphacat alphalabel
label define samplabel 1 "Yale law students (YLS sample)" 2 "American adults (ALP sample)"
label values sample samplabel

gen denom = cond(sample==1,`yaledenom',`alpdenom') 
gen graphvar1 = .
gen graphvar2 = .
forvalues i = 1/3 {
  forvalues j = 1/2 {
  count if eff_focus==1 & alphacat==`i' & sample==`j'
  replace graphvar1 = r(N) if alphacat==`i' & sample==`j'
  count if eff_focus==0 & alphacat==`i' & sample==`j'
  replace graphvar2 = r(N) if alphacat==`i' & sample==`j'  
 }
}
replace graphvar1 = graphvar1/denom
replace graphvar2 = graphvar2/denom

graph bar graphvar1 graphvar2, over(alphacat, label(labsize(*.75))) over(sample) stack ///
 bar(1, color(gs6)) bar(2, color(ebblue)) legend(cols(1) label(1 "Efficiency-focused") label(2 "Equality-focused") )
restore

** Figures 3 and S2:  alpha histograms 
preserve
count if samp==1
local yale_denom = r(N)
count if samp==2
local alp_denom = r(N)
count if samp==3
local ucb_denom = r(N)
count if samp==4
local elite_denom = r(N)
count if samp==5
local non_denom = r(N)
local tempmin = 0.4
gen alphabin = .
forvalues i = 1/6 { 
 local j = 0.1*`i'
 replace alphabin = `i' if alpha<=`tempmin'+`j' & alphabin==.
}
bysort alphabin:  egen yale_num = count(alpha) if sample==1
gen yalevar = yale_num / `yale_denom'
bysort alphabin:  egen alp_num = count(alpha) if sample==2
gen alpvar = alp_num / `alp_denom'
bysort alphabin:  egen ucb_num = count(alpha) if sample==3
gen ucbvar = ucb_num / `ucb_denom'
bysort alphabin:  egen elite_num = count(alpha) if sample==4
gen elitevar = elite_num / `elite_denom'
bysort alphabin:  egen non_num = count(alpha) if sample==5
gen nonvar = non_num / `non_denom'

label define alphalabel 1 "{&alpha} {&le} 0.5" 2 "0.5 {&lt} {&alpha} {&le} 0.6" 3 "0.6 {&lt} {&alpha} {&le} 0.7" ///
 4 "0.7 {&lt} {&alpha} {&le} 0.8" 5 "0.8 {&lt} {&alpha} {&le} 0.9" 6 "0.9 {&lt} {&alpha} {&le} 1"
label values alphabin alphalabel

graph bar (mean) yalevar alpvar, over(alphabin, label(angle(45) labsize(small))) bar(1, color(navy)) ///
 bar(2, fcolor(bluishgray) lcolor(navy)) ///
 ylabel(0(0.1)0.5) ///
 legend(cols(1) lab(1 "Yale law students (YLS sample)") lab(2 "American adults (ALP sample)"))
graph bar (mean) elitevar nonvar, over(alphabin, label(angle(45) labsize(small))) bar(1, color(navy)) ///
 bar(2, fcolor(bluishgray) lcolor(navy)) ///
 ylabel(0(0.1)0.5) ///
 legend(cols(1) lab(1 "ALP elites") lab(2 "ALP non-elites"))
graph bar (mean) ucbvar alpvar, over(alphabin, label(angle(45) labsize(small))) bar(1, color(navy)) ///
 bar(2, fcolor(bluishgray) lcolor(navy)) ///
 ylabel(0(0.1)0.5) ///
 legend(cols(1) lab(1 "UC Berkeley undergraduates (UCB sample)") lab(2 "American adults (ALP sample)"))
restore

** Figures 4 S3:  rho histograms 
preserve
count if samp==1
local yale_denom = r(N)
count if samp==2
local alp_denom = r(N)
count if samp==3
local ucb_denom = r(N)
count if samp==4
local elite_denom = r(N)
count if samp==5
local non_denom = r(N)
drop if rho==.
local tempmin = -1.5
gen rhobin = .
forvalues i = 1/10 { 
 local j = 0.5*`i'
 replace rhobin = `i' if rho<=`tempmin'+`j' & rhobin==.
}
bysort rhobin:  egen yale_num = count(rho) if sample==1
gen yalevar = yale_num / `yale_denom'
bysort rhobin:  egen alp_num = count(rho) if sample==2
gen alpvar = alp_num / `alp_denom'
bysort rhobin:  egen ucb_num = count(rho) if sample==3
gen ucbvar = ucb_num / `ucb_denom'
bysort rhobin:  egen elite_num = count(rho) if sample==4
gen elitevar = elite_num / `elite_denom'
bysort rhobin:  egen non_num = count(rho) if sample==5
gen nonvar = non_num / `non_denom'

label define rholabel 1 "{&rho} {&le} -1" /// 
 2 "-1 {&lt} {&rho} {&le} -0.5" 3 "-0.5 {&lt} {&rho} {&le} 0" 4 "0 {&lt} {&rho} {&le} 0.5" 5 "0.5 {&lt} {&rho} {&le} 1"
label values rhobin rholabel

graph bar (mean) yalevar alpvar, over(rhobin, label(angle(45) labsize(small))) bar(1, color(navy)) ///
 bar(2, fcolor(bluishgray) lcolor(navy)) ///
 ylabel(0(0.1)0.6) ///
 legend(cols(1) lab(1 "Yale law students (YLS sample)") lab(2 "American adults (ALP sample)"))
graph bar (mean) elitevar nonvar, over(rhobin, label(angle(45) labsize(small))) bar(1, color(navy)) ///
 bar(2, fcolor(bluishgray) lcolor(navy)) ///
 ylabel(0(0.1)0.6) ///
 legend(cols(1) lab(1 "ALP elites") lab(2 "ALP non-elites"))
graph bar (mean) ucbvar alpvar, over(rhobin, label(angle(45) labsize(small))) bar(1, color(navy)) ///
 bar(2, fcolor(bluishgray) lcolor(navy)) ///
 ylabel(0(0.1)0.6) ///
 legend(cols(1) lab(1 "UC Berkeley undergraduates (UCB sample)") lab(2 "American adults (ALP sample)"))
restore

